import request from '@/utils/request'

export function getTopicList(query) {
  return request({
    url: '/exam/getTopicList',
    method: 'get',
    params: query
  })
}

export function deleteTopic(id) {
  return request({
    url: '/exam/delTopic/' + id,
    method: 'get'
  })
}
export function toPublish(data) {
  return request({
    url: '/exam/toPublish',
    method: 'post',
    data: data
  })
}
// 获取专题编辑数据
export function getTopicDetail(id) {
  return request({
    url: `exam/getTopicDetail/` + id,
    method: 'get'
  })
}
// 获取专题编辑数据
export function topicEditSave(data) {
  return request({
    url: `exam/topicEditSave`,
    method: 'post',
    data: data
  })
}

// 获取讲师列表（实际从用户表获得）
export function getTeaInfo() {
  return request({
    url: '/exam/getTeacherInfo',
    method: 'get'
  })
}

// 获取讲师列表（实际从用户表获得）
export function getTheTea(id) {
  return request({
    url: '/exam/getTheTeacher/' + id,
    method: 'get'
  })
}
